package com.sl.proxy.client;

import com.sl.proxy.client.config.ProxyClientConfig;
import com.sl.proxy.client.config.ProxyClientConfiguration;
import com.sl.proxy.client.core.ProxyClientService;
import com.sl.proxy.client.handler.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * @author: aoshiguchen
 * @date: 2022/6/16
 */
@Slf4j
@Configuration
@ConditionalOnProperty(value = "square.lake.proxy.client.enabled", havingValue = "true", matchIfMissing = false)
@EnableConfigurationProperties(ProxyClientConfig.class)
@Import({ProxyClientConfiguration.class,
        ProxyMessageAuthHandler.class,
        ProxyMessageConnectHandler.class,
        ProxyMessageDisconnectHandler.class,
        ProxyMessageTransferHandler.class,
        ProxyMessageErrorHandler.class,
        UdpProxyMessageConnectHandler.class,
        UdpProxyMessageTransferHandler.class,
        ProxyClientService.class
})
@ComponentScan(basePackages = "com.sl.proxy.client")
public class ProxyClientAutoConfig {

}
